<template>
  <div id="app">
    <component id="app" :is="layout">
      <!-- 如果需要在布局中嵌套其他内容，可以放在这里 -->
    </component>  </div>
</template>

<script setup lang="ts">
import BasicLayout from "@/layouts/BasicLayout.vue";
import FullScreenLayout from "@/layouts/FullScreenLayout.vue";
import { useRoute } from 'vue-router'
import { computed } from 'vue'

// 计算并返回当前的布局组件
const route = useRoute();
const layout = computed(() => {
  switch (route.meta.layout) {
    case 'FullScreenLayout':
      return FullScreenLayout;
    default:
      return BasicLayout;
  }
});
</script>


<style>

</style>
